﻿using FellowshipOne.API.Base.Interfaces;
using FellowshipOne.API.Groups.Sets;

namespace FellowshipOne.API.Realms {

    public interface IGroupsRealm
    {
        IApiSet<Groups.Model.Member> Member { get; }
    }

    public class GroupsRealm : IGroupsRealm{
        #region Properties
        F1OAuthTicket Ticket { get; set; }
        string BaseUrl { get; set; }

        private IApiSet<Groups.Model.Member> _member;

        public IApiSet<Groups.Model.Member> Member => _member ?? (_member = new Member(Ticket, BaseUrl));

        #endregion
        #region Constructor

        
        public GroupsRealm(F1OAuthTicket ticket, string baseUrl) {
            Ticket = ticket;
            BaseUrl = baseUrl;
        }
        #endregion Constructor
    }
}
